home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / VideoServices.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  4.6 KB  |  178 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        VideoServices.h
  3.  
  4.      Contains:    Video Services Library Interfaces.
  5.  
  6.      Version:    Technology:    PowerSurge 1.0.2
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __VIDEOSERVICES__
  18. #define __VIDEOSERVICES__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __NAMEREGISTRY__
  25.     #include <NameRegistry.h>
  26. #endif
  27.  
  28. #ifndef __QUICKDRAW__
  29.     #include <Quickdraw.h>
  30. #endif
  31.  
  32.  
  33.  
  34.  
  35. #if PRAGMA_ONCE
  36. #pragma once
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46.  
  47. #if PRAGMA_STRUCT_ALIGN
  48.     #pragma options align=mac68k
  49. #elif PRAGMA_STRUCT_PACKPUSH
  50.     #pragma pack(push, 2)
  51. #elif PRAGMA_STRUCT_PACK
  52.     #pragma pack(2)
  53. #endif
  54.  
  55. enum {
  56.     kTransparentEncoding        = 0,
  57.     kInvertingEncoding            = 1
  58. };
  59.  
  60. enum {
  61.     kTransparentEncodingShift    = (kTransparentEncoding << 1),
  62.     kTransparentEncodedPixel    = (0x01 << kTransparentEncodingShift),
  63.     kInvertingEncodingShift        = (kInvertingEncoding << 1),
  64.     kInvertingEncodedPixel        = (0x01 << kInvertingEncodingShift)
  65. };
  66.  
  67.  
  68.  
  69.  
  70. enum {
  71.     kHardwareCursorDescriptorMajorVersion = 0x0001,
  72.     kHardwareCursorDescriptorMinorVersion = 0x0000
  73. };
  74.  
  75. typedef UInt32 *                        UInt32Ptr;
  76.  
  77. struct HardwareCursorDescriptorRec {
  78.     UInt16                             majorVersion;
  79.     UInt16                             minorVersion;
  80.     UInt32                             height;
  81.     UInt32                             width;
  82.     UInt32                             bitDepth;
  83.     UInt32                             maskBitDepth;
  84.     UInt32                             numColors;
  85.     UInt32Ptr                         colorEncodings;
  86.     UInt32                             flags;
  87.     UInt32                             supportedSpecialEncodings;
  88.     UInt32                             specialEncodings[16];
  89. };
  90. typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
  91.  
  92. typedef HardwareCursorDescriptorRec *    HardwareCursorDescriptorPtr;
  93. enum {
  94.     kHardwareCursorInfoMajorVersion = 0x0001,
  95.     kHardwareCursorInfoMinorVersion = 0x0000
  96. };
  97.  
  98.  
  99. struct HardwareCursorInfoRec {
  100.     UInt16                             majorVersion;                /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
  101.     UInt16                             minorVersion;                /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
  102.     UInt32                             cursorHeight;
  103.     UInt32                             cursorWidth;
  104.     CTabPtr                         colorMap;                    /* nil or big enough for hardware's max colors*/
  105.     Ptr                             hardwareCursor;
  106.     UInt32                             reserved[6];                /* Test tool should check for 0s*/
  107. };
  108. typedef struct HardwareCursorInfoRec    HardwareCursorInfoRec;
  109.  
  110. typedef HardwareCursorInfoRec *            HardwareCursorInfoPtr;
  111.  
  112. enum {
  113.     kVBLInterruptServiceType    = FOUR_CHAR_CODE('vbl '),
  114.     kHBLInterruptServiceType    = FOUR_CHAR_CODE('hbl '),
  115.     kFrameInterruptServiceType    = FOUR_CHAR_CODE('fram'),
  116.     kConnectInterruptServiceType = FOUR_CHAR_CODE('dci '),        /* Renamed -- Use kFBCheckInterruptServiceType*/
  117.     kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/
  118.     kFBChangedInterruptServiceType = FOUR_CHAR_CODE('chng'),    /* Demand to rebuild (Hardware has reinitialized on dependent change)*/
  119.     kFBOfflineInterruptServiceType = FOUR_CHAR_CODE('remv'),    /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/
  120.     kFBOnlineInterruptServiceType = FOUR_CHAR_CODE('add ')        /* Notice that hardware is available (after being removed)*/
  121. };
  122.  
  123. enum {
  124.     kMaxDisplayConfigDataSize    = 64                            /* Max data size for VSLSetDisplayConfiguration*/
  125. };
  126.  
  127. typedef ResType                         InterruptServiceType;
  128. typedef UInt32                             InterruptServiceIDType;
  129. typedef InterruptServiceIDType *        InterruptServiceIDPtr;
  130. EXTERN_API_C( OSErr )
  131. VSLNewInterruptService            (RegEntryID *            serviceDevice,
  132.                                  InterruptServiceType     serviceType,
  133.                                  InterruptServiceIDPtr     serviceID);
  134.  
  135. EXTERN_API_C( OSErr )
  136. VSLWaitOnInterruptService        (InterruptServiceIDType  serviceID,
  137.                                  Duration                 timeout);
  138.  
  139. EXTERN_API_C( OSErr )
  140. VSLDisposeInterruptService        (InterruptServiceIDType  serviceID);
  141.  
  142. EXTERN_API_C( OSErr )
  143. VSLDoInterruptService            (InterruptServiceIDType  serviceID);
  144.  
  145. EXTERN_API_C( Boolean )
  146. VSLPrepareCursorForHardwareCursor (void *                cursorRef,
  147.                                  HardwareCursorDescriptorPtr  hardwareDescriptor,
  148.                                  HardwareCursorInfoPtr     hwCursorInfo);
  149.  
  150. EXTERN_API_C( OSErr )
  151. VSLSetDisplayConfiguration        (RegEntryID *            device,
  152.                                  RegPropertyName *        propertyName,
  153.                                  void *                    configData,
  154.                                  long                     configDataSize);
  155.  
  156.  
  157.  
  158. #if PRAGMA_STRUCT_ALIGN
  159.     #pragma options align=reset
  160. #elif PRAGMA_STRUCT_PACKPUSH
  161.     #pragma pack(pop)
  162. #elif PRAGMA_STRUCT_PACK
  163.     #pragma pack()
  164. #endif
  165.  
  166. #ifdef PRAGMA_IMPORT_OFF
  167. #pragma import off
  168. #elif PRAGMA_IMPORT
  169. #pragma import reset
  170. #endif
  171.  
  172. #ifdef __cplusplus
  173. }
  174. #endif
  175.  
  176. #endif /* __VIDEOSERVICES__ */
  177.  
  178.